<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>AdWords API Documentation</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><link rel="stylesheet" href="../css/template.css" type="text/css"></link></head><body><div id="content"><h1 class="file">Common/Lib/AdsUser.php</h1><div id="file-nav-box"><div id="file-nav-container"><ul id="file-nav"><li><a href="#constants"><img src="../images/icons/constant.png" height="14"></img>
                          Constants
                      </a><ul><li><a href="#::$name">$name</a></li></ul></li><li><a href="#functions"><img src="../images/icons/function.png" alt="Function" height="14"></img>
                          Functions
                      </a><ul></ul></li><li><a href="#classes"><img src="../images/icons/class.png" alt="Class" height="14"></img>
                          Classes
                      </a><ul><li><a href="#\AdsUser">\AdsUser</a></li></ul></li></ul><div style="clear: left;"></div></div><div id="file-nav-tab">
              Table of Contents
          </div></div><a name="top" class="anchor"></a><div id="file-description"><div class="short-description">User class for all API modules using the Ads API.</div><div class="long-description"><p>PHP version 5</p>

<p>Copyright 2011, Google Inc. All Rights Reserved.</p>

<p>Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at</p>

<pre><code>http://www.apache.org/licenses/LICENSE-2.0
</code></pre>

<p>Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.</p></div></div><dl class="file-info"><dt>Author</dt><dd>Adam Rogal
         
    </dd><dt>Author</dt><dd>Eric Koleda
         
    </dd><dt>Author</dt><dd>Vincent Tsao
         
    </dd><dt>Category</dt><dd>WebServices
         
    </dd><dt>Copyright</dt><dd>2011, Google Inc. All Rights Reserved.
         
    </dd><dt>License</dt><dd>http://www.apache.org/licenses/LICENSE-2.0 Apache License,
            Version 2.0
         
    </dd><dt>Package</dt><dd>GoogleApiAdsCommon
         
    </dd><dt>Subpackage</dt><dd>Lib
         
    </dd></dl><a name="constants" class="anchor"></a><h2>Constants</h2><div><a id="::$name" class="anchor"></a><div class="constant publicC"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/constant.png" alt="Constant"></img> 
                <span class="highlight">$name</span>
                = $value</code><div class="description"></div><div class="code-tabs"></div><div class="clear"></div></div></div><a name="classes" class="anchor"></a><a id="\AdsUser" class="anchor"></a><h2 class="class">\AdsUser<div class="to-top"><a href="#top">jump to top</a></div></h2><div class="class"><small class="package"><b>Package: </b>GoogleApiAdsCommon\Lib</small><div class="short-description">User class for all API modules using the Ads API.</div><div class="long-description"></div><dl class="class-info"><dt>Children</dt><dd><a href="../files/AdWords.Lib.AdWordsUser.html#\AdWordsUser">\AdWordsUser</a></dd></dl><h3>Properties</h3><div><a id="\AdsUser::$authServer" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">$authServer</span></code><div class="description"></div><div class="code-tabs"><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div><a id="\AdsUser::$defaultServer" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">$defaultServer</span></code><div class="description"></div><div class="code-tabs"><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div><a id="\AdsUser::$defaultVersion" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">$defaultVersion</span></code><div class="description"></div><div class="code-tabs"><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div><a id="\AdsUser::$libName" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">$libName</span></code><div class="description"></div><div class="code-tabs"><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div><a id="\AdsUser::$libVersion" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">$libVersion</span></code><div class="description"></div><div class="code-tabs"><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div><a id="\AdsUser::$logsDirectory" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">$logsDirectory</span></code><div class="description"></div><div class="code-tabs"><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div><a id="\AdsUser::$oauth2Handler" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">$oauth2Handler</span></code><div class="description"></div><div class="code-tabs"><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div><a id="\AdsUser::$oauth2Info" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">$oauth2Info</span></code><div class="description"></div><div class="code-tabs"><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div><a id="\AdsUser::$requestHeaderElements" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">$requestHeaderElements</span></code><div class="description"></div><div class="code-tabs"><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div><a id="\AdsUser::$soapCompression" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">$soapCompression</span></code><div class="description"></div><div class="code-tabs"><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div><a id="\AdsUser::$soapCompressionLevel" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">$soapCompressionLevel</span></code><div class="description"></div><div class="code-tabs"><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div><a id="\AdsUser::$wsdlCache" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">$wsdlCache</span></code><div class="description"></div><div class="code-tabs"><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>n/a</dd></dl></div><div class="clear"></div></div></div><h3>Methods</h3><div><a id="\AdsUser::Define()" class="anchor"></a><div class="method private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">Define</span><span class="nb-faded-text">(string $name, string $value)</span> : void</code><div class="description"><p class="short_description">Define a constant if it isn't already defined.</p></div><div class="code-tabs"><div class="long-description"><p>If it is defined but the
value is different then attempt to redefine it, which will fail and throw
the appropriate error.</p></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$name</th><td>string</td><td><em><p>the name of the constant</p></em></td></tr><tr><th>$value</th><td>string</td><td><em><p>the value of the constant</p></em></td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::GetAllClientLibraryUserAgentParts()" class="anchor"></a><div class="method private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">GetAllClientLibraryUserAgentParts</span><span class="nb-faded-text">()</span> : array</code><div class="description"><p class="short_description">Gets all the user agent parts that identify this client library.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>array</td><td>An array of all the user agent parts that identify this
    client library where each user agent part has been joined by a '/'
    (forward slash).</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::GetAuthServer()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetAuthServer</span><span class="nb-faded-text">()</span> : string</code><div class="description"><p class="short_description">Gets the server used for authentication.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the server used for authentiation</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::GetAuthVarValue()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">GetAuthVarValue</span><span class="nb-faded-text">(string $authVar, string $authVarName, array $authIni)</span> : string</code><div class="description"><p class="short_description">Gets the authenticaiton value for the <var>$authVar</var> supplied.</p></div><div class="code-tabs"><div class="long-description"><p>If
the <var>$authVar</var> is set, it is is used. Otherwise, the supplied
<var>$authenticationIni</var> is queired for the variable. If none is found
<var>NULL</var> is returned.</p></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$authVar</th><td>string</td><td><em><p>the default value for the authenticaiton variable</p></em></td></tr><tr><th>$authVarName</th><td>string</td><td><em><p>the name of the authencation variable</p></em></td></tr><tr><th>$authIni</th><td>array</td><td><em><p>the array of authentication variables from
    an INI file</p></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the authentication variable value</td></tr></table><strong>Details</strong><dl class="function-info"><dt>Access</dt><dd>protected
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsUser::GetClientLibraryNameAndVersion()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">GetClientLibraryNameAndVersion</span><span class="nb-faded-text">()</span> : array</code><div class="description"><span class="attribute">abstract</span><p class="short_description">Gets the name and version of this client library.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>array</td><td>An array containing the name and version of this client
    library, e.g.: ['DfpApi-PHP', '2.13.0'].</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::GetClientLibraryUserAgent()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetClientLibraryUserAgent</span><span class="nb-faded-text">()</span> : string</code><div class="description"><p class="short_description">Gets the user agent string that identifies this library for this user.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>A user agent string.</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::GetCommonClientLibraryUserAgentParts()" class="anchor"></a><div class="method private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">GetCommonClientLibraryUserAgentParts</span><span class="nb-faded-text">()</span> : array</code><div class="description"><p class="short_description">Gets common PHP user agent parts for ads client libraries such as PHP
version, operating system, browser, or if compression is being used or not.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>array</td><td>An array of arrays with each inner array representing a user
    agent parts, e.g.: ['PHP', '5.3.2'] or ['PHP', '5.4.0'].</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::GetDefaultOAuth2Handler()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetDefaultOAuth2Handler</span><span class="nb-faded-text">(NULL | string $className = NULL)</span> : mixed</code><div class="description"><span class="attribute">abstract</span><p class="short_description">Get the default OAuth2 Handler for this user.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$className</th><td>NULL | string</td><td><em><p>the name of the oauth2Handler class or NULL</p></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>mixed</td><td>the configured OAuth2Handler class</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::GetDefaultServer()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetDefaultServer</span><span class="nb-faded-text">()</span> : string</code><div class="description"><p class="short_description">Gets the default server.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the default server</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::GetDefaultVersion()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetDefaultVersion</span><span class="nb-faded-text">()</span> : string</code><div class="description"><p class="short_description">Gets the default version.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the default version</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::GetHeaderNames()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetHeaderNames</span><span class="nb-faded-text">()</span> : array</code><div class="description"><p class="short_description">Gets the names of all registered request header elements.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>array</td><td>the names of the request header elements</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::GetHeaderValue()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetHeaderValue</span><span class="nb-faded-text">(string $key)</span> : string</code><div class="description"><p class="short_description">Gets the value for a registered request header element.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$key</th><td>string</td><td><em><p>the name of the request header element</p></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the value of the request header element or NULL if not found</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::GetLogsDirectory()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetLogsDirectory</span><span class="nb-faded-text">()</span> : string</code><div class="description"><p class="short_description">Gets the logs directory.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the logs directory</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::GetOAuth2Handler()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetOAuth2Handler</span><span class="nb-faded-text">()</span> : <a href="../files/Common.Util.OAuth2Handler.html#\OAuth2Handler">\OAuth2Handler</a></code><div class="description"><p class="short_description">Gets the OAuth2 handler for this user.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td><a href="../files/Common.Util.OAuth2Handler.html#\OAuth2Handler">\OAuth2Handler</a></td><td>the OAuth2 handler for this user</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::GetOAuth2Info()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetOAuth2Info</span><span class="nb-faded-text">()</span> : array</code><div class="description"><p class="short_description">Gets the OAuth2 info for this user.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>array</td><td>the OAuth2 info for this user</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::GetServiceSoapClient()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetServiceSoapClient</span><span class="nb-faded-text">(string $serviceName, <a href="../files/Common.Lib.SoapClientFactory.html#\SoapClientFactory">\SoapClientFactory</a> $serviceFactory)</span> : <a href="../files/http://php.net/manual/en/class.soapclient.php">\SoapClient</a></code><div class="description"><p class="short_description">Gets the service by its service name.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$serviceName</th><td>string</td><td><em><p>the service name</p></em></td></tr><tr><th>$serviceFactory</th><td><a href="../files/Common.Lib.SoapClientFactory.html#\SoapClientFactory">\SoapClientFactory</a></td><td><em><p>the service factory</p></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td><a href="../files/http://php.net/manual/en/class.soapclient.php">\SoapClient</a></td><td>the instantiated service</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::GetSetting()" class="anchor"></a><div class="method private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">GetSetting</span><span class="nb-faded-text">(array $settings, string $section, string $name, mixed $default = NULL)</span> : string</code><div class="description"><p class="short_description">Gets the value for a given setting based on the contents of the parsed INI
file.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$settings</th><td>array</td><td><em><p>the parsed settings INI file</p></em></td></tr><tr><th>$section</th><td>string</td><td><em><p>the name of the section containing the setting</p></em></td></tr><tr><th>$name</th><td>string</td><td><em><p>the name of the setting</p></em></td></tr><tr><th>$default</th><td>mixed</td><td><em><p>the default value of the setting</p></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the value of the setting</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::GetSoapCompressionLevel()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetSoapCompressionLevel</span><span class="nb-faded-text">()</span> : int</code><div class="description"><p class="short_description">Gets the SOAP compression level.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>int</td><td>the SOAP compression level</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::GetUserAgentHeaderName()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">GetUserAgentHeaderName</span><span class="nb-faded-text">()</span> : string</code><div class="description"><span class="attribute">abstract</span><p class="short_description">Gets the appropriate user agent header name for the API this client library
is targeting.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>The user agent header name.</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::GetWsdlCacheType()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetWsdlCacheType</span><span class="nb-faded-text">()</span> : int</code><div class="description"><p class="short_description">Gets the type of WSDL caching in use.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>int</td><td>the type of WSDL caching in use</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::InitLogs()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">InitLogs</span><span class="nb-faded-text">()</span> : void</code><div class="description"><p class="short_description">Initializes the logging mechanism used by services created by this user.</p></div><div class="code-tabs"><div class="long-description"><p>HTTP headers and SOAP XML are logged to the soap_xml.log file and all
request information is logged to the request_info.log file under the logs
directory.</p></div></div><div class="clear"></div></div><a id="\AdsUser::IsSoapCompressionEnabled()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">IsSoapCompressionEnabled</span><span class="nb-faded-text">()</span> : bool</code><div class="description"><p class="short_description">Is SOAP compression enabled.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>bool</td><td>is SOAP compression enabled</td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::LoadSettings()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">LoadSettings</span><span class="nb-faded-text">(string $settingsIniPath, string $defaultVersion, string $defaultServer, string $defaultLogsDir, string $logsRelativePathBase)</span> : void</code><div class="description"><p class="short_description">Loads the settings for this client library.</p></div><div class="code-tabs"><div class="long-description"><p>If the settings INI file
located at <var>$settingsIniPath</var> cannot be loaded, then the
parameters passed into this method are used.</p></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$settingsIniPath</th><td>string</td><td><em><p>the path to the settings INI file</p></em></td></tr><tr><th>$defaultVersion</th><td>string</td><td><em><p>the default version if the settings INI file
    cannot be loaded</p></em></td></tr><tr><th>$defaultServer</th><td>string</td><td><em><p>the default server if the settings INI file
    cannot be loaded</p></em></td></tr><tr><th>$defaultLogsDir</th><td>string</td><td><em><p>the default logs directory if the settings
    INI file cannot be loaded</p></em></td></tr><tr><th>$logsRelativePathBase</th><td>string</td><td><em><p>the relative path base for the logs
    directory</p></em></td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::LogAll()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">LogAll</span><span class="nb-faded-text">()</span> : void</code><div class="description"><p class="short_description">Configures the library to log all requests.</p></div><div class="code-tabs"><div class="long-description"></div></div><div class="clear"></div></div><a id="\AdsUser::LogDefaults()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">LogDefaults</span><span class="nb-faded-text">()</span> : void</code><div class="description"><p class="short_description">Configures the library to log basic information about all requests and
the full SOAP XML request and response only when an error occurs.</p></div><div class="code-tabs"><div class="long-description"></div></div><div class="clear"></div></div><a id="\AdsUser::LogErrors()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">LogErrors</span><span class="nb-faded-text">()</span> : void</code><div class="description"><p class="short_description">Configures the library to only log requests that return an error.</p></div><div class="code-tabs"><div class="long-description"></div></div><div class="clear"></div></div><a id="\AdsUser::SetClientLibraryUserAgent()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">SetClientLibraryUserAgent</span><span class="nb-faded-text">( $applicationName)</span> : void</code><div class="description"><p class="short_description">Sets the user agent string that identifies this library for this user.</p></div><div class="code-tabs"><div class="long-description"><p>TODO(vtsao): The current contract requires that subclasses call this method
in their constructor.</p></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$applicationName</th><td></td><td><em><p>The application name that will appear in this
    header.</p></em></td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::SetDefaultServer()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">SetDefaultServer</span><span class="nb-faded-text">(string $defaultServer)</span> : void</code><div class="description"><p class="short_description">Sets the default server.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$defaultServer</th><td>string</td><td><em><p>the default server</p></em></td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::SetDefaultVersion()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">SetDefaultVersion</span><span class="nb-faded-text">(string $defaultVersion)</span> : void</code><div class="description"><p class="short_description">Sets the default version.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$defaultVersion</th><td>string</td><td><em><p>the default version</p></em></td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::SetHeaderValue()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">SetHeaderValue</span><span class="nb-faded-text">(string $key, string $value)</span> : void</code><div class="description"><p class="short_description">Sets the value for a request header.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$key</th><td>string</td><td><em><p>the name of the request header element</p></em></td></tr><tr><th>$value</th><td>string</td><td><em><p>the value for the request header element</p></em></td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::SetOAuth2Handler()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">SetOAuth2Handler</span><span class="nb-faded-text">(array $oauth2Handler)</span> : void</code><div class="description"><p class="short_description">Sets the OAuth2 handler for this user.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$oauth2Handler</th><td>array</td><td><em><p>the OAuth2 handler for this user</p></em></td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::SetOAuth2Info()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">SetOAuth2Info</span><span class="nb-faded-text">(array $oauth2Info)</span> : void</code><div class="description"><p class="short_description">Sets the OAuth2 info for this user.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$oauth2Info</th><td>array</td><td><em><p>the OAuth2 info for this user</p></em></td></tr></table></div><div class="clear"></div></div><a id="\AdsUser::ValidateOAuth2Info()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">ValidateOAuth2Info</span><span class="nb-faded-text">()</span> : void</code><div class="description"><p class="short_description">Validates that the OAuth2 info is complete.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Throws</strong><table class="argument-info"><thead><tr><th>Exception</th><th>Description</th></tr></thead><tr><td><a href="../files/Common.Lib.ValidationException.html#\ValidationException">\ValidationException</a></td><td><em>if there are any validation errors</em></td></tr></table><strong>Details</strong><dl class="function-info"><dt>Access</dt><dd>protected
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsUser::__construct()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">__construct</span><span class="nb-faded-text">()</span> : void</code><div class="description"><p class="short_description">Constructor for AdsUser.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="function-info"><dt>Access</dt><dd>protected
         
    </dd></dl></div><div class="clear"></div></div></div></div></div><small class="footer">
            Documentation was generated by
            <a href="http://phpdoc.org">phpDocumentor
                2.0.0a12</a>.
        </small></body></html>
